package cn.buk.tms.flight.dto;


/**
 * 针对FlightOrderExternal的
 * 机票外部订单的DTO
 */
public class FlightExternalOrderDto {

  private int id;

  /**
   * 订单号
   */
  private String orderNo;

  /**
   * 供应商id
   */
  private Integer supplierId;

  /**
   * 外部订单号
   */
  private String externalOrderNo;

  /**
   * 供应商名称
   */
  private String supplierName;

  /**
   * 公布运价，也可以称之为航司指导价，票面价(不用于计算）,但在自动开票时用于对比价格
   */
  private Double price;

  /**
   * 销售价（国内航班一般等同于price, 但机票代理可能会加价销售，也就是在航司的实际销售价格基础上加价）
   */
  private Double parvalue;

  /**
   * 税（总税额）
   */
  private Double tax;


  /**
   * 第三方收取的开票服务费
   */
  private Double serviceCharge;

  /**
   * 第三方给予的让利金额
   */
  private Double discount;

  /**
   * 计算出来的结算价
   */
  private Double cost;

  /**
   * 第三方订单的状态
   */
  private String orderStatus;

  /**
   * 来自第三方的备注
   */
  private String remark;

  public void calc() {
    if (this.parvalue != null && this.tax != null && this.serviceCharge != null && this.discount != null) {
      this.cost = this.parvalue + this.tax + this.serviceCharge - this.discount;
    }
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getOrderNo() {
    return orderNo;
  }

  public void setOrderNo(String orderNo) {
    this.orderNo = orderNo;
  }

  public Integer getSupplierId() {
    return supplierId;
  }

  public void setSupplierId(Integer supplierId) {
    this.supplierId = supplierId;
  }

  public String getExternalOrderNo() {
    return externalOrderNo;
  }

  public void setExternalOrderNo(String externalOrderNo) {
    this.externalOrderNo = externalOrderNo;
  }

  public String getSupplierName() {
    return supplierName;
  }

  public void setSupplierName(String supplierName) {
    this.supplierName = supplierName;
  }

  public Double getPrice() {
    return price;
  }

  public void setPrice(Double price) {
    this.price = price;
  }

  public Double getParvalue() {
    return parvalue;
  }

  public void setParvalue(Double parvalue) {
    this.parvalue = parvalue;
  }

  public Double getTax() {
    return tax;
  }

  public void setTax(Double tax) {
    this.tax = tax;
  }

  public Double getServiceCharge() {
    return serviceCharge;
  }

  public void setServiceCharge(Double serviceCharge) {
    this.serviceCharge = serviceCharge;
  }

  public Double getDiscount() {
    return discount;
  }

  public void setDiscount(Double discount) {
    this.discount = discount;
  }

  public Double getCost() {
    return cost;
  }

  public String getOrderStatus() {
    return orderStatus;
  }

  public void setOrderStatus(String orderStatus) {
    this.orderStatus = orderStatus;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }
}
